<?php

/*
 * The quanly nghe nghiep - ung vien
 */

class Mucdohoanthanhhoso extends CWidget{
    
    public function init() {
        parent::init();
    }
    
    public function run() {
        parent::run();
        
        //ho so id
        $hid = $_GET['id'] > 0 ? $_GET['id']  : 0;
        
        //process
        $process = 20;
        
        //muc do
        $nn     = 'Chưa xong';
        $hv     = 'Chưa xong';
        $kn     = 'Chưa xong';
        $kynang = 'Chưa xong';
        
        //load data
        $hoso = Hoso::model()->find('id=:hid', array(':hid' => $hid));
        if($hoso->hoantat_thongtinnghenghiep){
            $process += 20;
            $nn = 'Hoàn tất';
        }
        if($hoso->hoantat_quatrinhhocvan){
            $process += 20;
            $hv = 'Hoàn tất';
        }
        if($hoso->hoantat_kinhnghiemlamviec){
            $process += 20;
            $kn = 'Hoàn tất';
        }
        if($hoso->hoantat_kynangchuyenmon){
            $process += 20;
            $kynang = 'Hoàn tất';
        }
        
        $this->render('mucdohoanthanhhoso',array(
            'model' => $hoso, 
            'process' => $process,
            'nn'      => $nn,
            'hv'      => $hv,
            'kn'      => $kn,
            'kynang'  => $kynang
        ));
        
    }
    
}

?>
